package com.ruoyi.secondvitim.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.secondvitim.mapper.QueFormDetailOptionMapper;
import com.ruoyi.secondvitim.domain.QueFormDetailOption;
import com.ruoyi.secondvitim.service.IQueFormDetailOptionService;

/**
 * 调查问卷详情选项Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-16
 */
@Service
public class QueFormDetailOptionServiceImpl implements IQueFormDetailOptionService 
{
    @Autowired
    private QueFormDetailOptionMapper queFormDetailOptionMapper;

    /**
     * 查询调查问卷详情选项
     * 
     * @param id 调查问卷详情选项主键
     * @return 调查问卷详情选项
     */
    @Override
    public QueFormDetailOption selectQueFormDetailOptionById(Long id)
    {
        return queFormDetailOptionMapper.selectQueFormDetailOptionById(id);
    }

    /**
     * 查询调查问卷详情选项列表
     * 
     * @param queFormDetailOption 调查问卷详情选项
     * @return 调查问卷详情选项
     */
    @Override
    public List<QueFormDetailOption> selectQueFormDetailOptionList(QueFormDetailOption queFormDetailOption)
    {
        return queFormDetailOptionMapper.selectQueFormDetailOptionList(queFormDetailOption);
    }

    /**
     * 新增调查问卷详情选项
     * 
     * @param queFormDetailOption 调查问卷详情选项
     * @return 结果
     */
    @Override
    public int insertQueFormDetailOption(QueFormDetailOption queFormDetailOption)
    {
        queFormDetailOption.setCreateTime(DateUtils.getNowDate());
        return queFormDetailOptionMapper.insertQueFormDetailOption(queFormDetailOption);
    }

    /**
     * 修改调查问卷详情选项
     * 
     * @param queFormDetailOption 调查问卷详情选项
     * @return 结果
     */
    @Override
    public int updateQueFormDetailOption(QueFormDetailOption queFormDetailOption)
    {
        queFormDetailOption.setUpdateTime(DateUtils.getNowDate());
        return queFormDetailOptionMapper.updateQueFormDetailOption(queFormDetailOption);
    }

    /**
     * 批量删除调查问卷详情选项
     * 
     * @param ids 需要删除的调查问卷详情选项主键
     * @return 结果
     */
    @Override
    public int deleteQueFormDetailOptionByIds(Long[] ids)
    {
        return queFormDetailOptionMapper.deleteQueFormDetailOptionByIds(ids);
    }

    /**
     * 删除调查问卷详情选项信息
     * 
     * @param id 调查问卷详情选项主键
     * @return 结果
     */
    @Override
    public int deleteQueFormDetailOptionById(Long id)
    {
        return queFormDetailOptionMapper.deleteQueFormDetailOptionById(id);
    }
}
